System and method utilizing an editing initialization block in a part program editing environment in a machine vision system

ABSTRACT

A method is provided for defining and utilizing an editing initialization block for a part program. The part program comprises a plurality of steps for taking measurements of a part and is displayed in an editing interface. An option is provided in the editing interface for selecting which steps are in an editing initialization block. After the part program has been saved, at a later time when the part program is recalled for editing, the editing initialization block may be run before additional steps are added to the part program. At least some of the data that would have been obtained by one or more of the initial part program steps that are not in the editing initialization block may be based on estimated data that is related to (e.g., modified based on) data determined from running the editing initialization block.

FIELD OF THE INVENTION

The invention relates generally to machine vision inspection systems,and more particularly to methods for creating and editing part programsin such systems.

BACKGROUND

Precision machine vision inspection systems (or “vision systems” forshort) can be utilized to obtain precise dimensional measurements ofinspected objects and to inspect various other object characteristics.Such systems may include a computer, a camera and optical system, and aprecision stage that is movable in multiple directions so as to allowthe camera to scan the features of a workpiece that is being inspected.One exemplary prior art system that is commercially available is theQUICK VISION® series of PC-based vision systems and QVPAK® softwareavailable from Mitutoyo America Corporation (MAC), located in Aurora,Ill. The features and operation of the QUICK VISION® series of visionsystems and the QVPAK® software are generally described, for example, inthe QVPAK 3D CNC Vision Measuring Machine User's Guide, publishedJanuary 2003, and the QVPAK 3D CNC Vision Measuring Machine OperationGuide, published September 1996, each of which is hereby incorporated byreference in their entirety. This product, as exemplified by the QV-302Pro model, for example, is able to use a microscope-type optical systemto provide images of a workpiece at various magnifications, and move thestage as necessary to traverse the workpiece surface beyond the limitsof any single video image. A single video image typically encompassesonly a portion of the workpiece being observed or inspected, given thedesired magnification, measurement resolution, and physical sizelimitations of such systems.

Machine vision inspection systems generally utilize automated videoinspection. U.S. Pat. No. 6,542,180 teaches various aspects of suchautomated video inspection and is incorporated herein by reference inits entirety. As taught in the '180 patent, automated video inspectionmetrology instruments generally have a programming capability thatallows an automatic inspection event sequence to be defined by the userfor each particular workpiece configuration. This can be implemented bytext-based programming, for example, or through a recording mode whichprogressively “learns” the inspection event sequence by storing asequence of machine control instructions corresponding to a sequence ofinspection operations performed by a user with the aid of a graphicaluser interface, or through a combination of both methods. Such arecording mode is often referred to as “learn mode” or “training mode.”Once the inspection event sequence is defined in “learn mode,” such asequence can then be used to automatically acquire (and additionallyanalyze or inspect) images of a workpiece during “run mode.”

Video tools (or “tools” for short) and other graphical user interfacefeatures may be used manually to accomplish manual inspection and/ormachine control operations (in “manual mode”). Their set-up parametersand operation can also be recorded during learn mode, in order to createautomatic inspection programs, or “part programs.” Video tools mayinclude, for example, edge/boundary detection tools, autofocus tools,shape or pattern matching tools, dimension measuring tools, and thelike. Other graphical user interface features may include dialog boxesrelated to data analysis, step and repeat loop programming, and thelike. For example, such tools are routinely used in a variety ofcommercially available machine vision inspection systems, such as theQUICK VISION® series of vision systems and the associated QVPAK®software, discussed above.

The machine control instructions including the specific inspection eventsequence (i.e., how to acquire each image and how to analyze/inspecteach acquired image) are generally stored as a “part program” or“workpiece program” that is specific to the particular workpiececonfiguration. For example, a part program defines how to acquire eachimage, such as how to position the camera relative to the workpiece, atwhat lighting level, at what magnification level, etc. Further, the partprogram defines how to analyze/inspect an acquired image, for example,by using one or more video tools such as edge/boundary detection videotools.

Editing a part program can be a complex task. For example, if a usersaves a partially completed part program and has to return at a latertime to finish the programming, if changes have occurred in the interim(e.g., changes in environmental conditions, the part being inadvertentlymoved on the stage, etc.), then the entire part program may need to bererun before any additional steps are added. A need exists for editingoperations and features which overcome these and other deficiencies toallow more efficient, intuitive, and flexible editing of part programsfor precision machine vision inspection systems.

SUMMARY

This summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This summary is not intended to identify key features ofthe claimed subject matter, nor is it intended to be used as an aid indetermining the scope of the claimed subject matter.

A method is provided for editing a part program on a machine visioninspection system. The machine vision inspection system includes animaging portion, a stage for holding one or more parts in a field ofview (FOV) of the imaging portion, a motion control portion that movesthe imaging portion relative to the stage, a display that displays auser interface (UI), and a controller.

In accordance with one aspect of the invention, the method begins bydefining a plurality of initial part program steps and displayingcorresponding part program step representations in an editing interfaceof the user interface. An editing initialization portion is thenprovided and operated to define at least some of the plurality ofinitial part program steps as editing initialization steps for the partprogram. The editing initialization portion is then operated such thatwhen a part program is recalled for editing, if the part programincludes defined editing initialization steps then the editinginitialization portion performs at least one of (a) prompting the userwith a user interface feature indicating the editing initializationsteps may be run, and (b) running the editing initialization stepsbefore allowing the addition of steps to the part program.

In accordance with another aspect of the invention, the editinginitialization portion can be configured by a user to define the editinginitialization steps. In one embodiment, the editing initializationportion comprises a drop down menu that is provided in the editinginterface with a selection for defining the editing initializationsteps. In one implementation, the set of the editing initializationsteps is defined as an editing initialization block which may bedetermined by the user indicating the last initial part program stepthat is an editing initialization step.

In accordance with another aspect of the invention, the editinginitialization portion comprises an indicator which is at least one of acolor bar, a delimiting pointer, or a text highlighting portion. Theuser may utilize such an indicator to define in the editing interfacewhich of the initial part program steps are editing initializationsteps. In one embodiment, when the part program is recalled for editing,a similar indicator is displayed in the user interface to indicate whichsteps are the editing initialization steps.

In accordance with another aspect of the invention, a pop-up block isprovided as the user interface feature which asks the user whether ornot the editing initialization steps should be run. In one embodiment,such a user interface feature may be automatically provided to the userat a time when the part program is recalled and an indication is madethat additional part program steps are to be added.

In accordance with another aspect of the invention, the editinginitialization steps comprise part program steps that move the imagingportion relative to the stage. In one embodiment, such steps maydetermine at least one of an origin coordinate or an orientation of thepart that is used as a reference for measuring other features on thepart. In one particular implementation, such steps may reestablish apart coordinate system for the part so as to compensate for anyinadvertent movement of the part on the stage since the last partprogram steps were performed. In one embodiment, initial part programsteps that would otherwise move the imaging portion relative to thestage except that they are not editing initialization steps are not run.

In accordance with another aspect of the invention, when a part programis recalled for editing and the editing initialization steps are run, atleast some of the data that would have been obtained by one or more ofthe initial part program steps that are not editing initialization stepsmay be based on estimated data that is related to (e.g., modified basedon) data determined from running the editing initialization steps. Inthe absence of the defined editing initialization steps, placing such“non-initialization steps” in an acceptable condition for editing wouldotherwise require certain time consuming processes (e.g., hardwareinteractions such as moving the stage, edge detection operations,focusing operations, lighting adjustments, pattern matching, etc.) to beinteractively controlled in an awkward and error-prone time consumingmanner.

It should be appreciated that providing a simple, time-efficient androbust editing environment for machine vision part programs issignificantly more difficult than providing an adequate editingenvironment for editing simple computer programs, because potentiallydangerous motions and mechanical collisions must be revealed andconsidered during the program editing process. In addition, providing asimple, time-efficient and robust editing environment for editingmachine vision part programs is significantly more difficult thanproviding an adequate editing environment for editing assembly robotprograms and the like (e.g., programs which control a robot's geometricmotions and actuators, and the like), because unique workpiecegeometries and surface finishes require that unpredictable and subtlelighting and imaging effects be revealed and considered and customizedduring the program editing process. In addition, machine visioninspection systems are required to perform operations that determinerelationships between features that are measured and inspected atdifferent locations on a workpiece and at different points in time, byrespective operations that may be dispersed throughout a part program.Thus, providing a robust editing environment that allows a relativelyunskilled user to edit an existing part program beginning at anarbitrary point within the program is a difficult task. It should beappreciated based on the disclosure herein that the editinginitialization portion and methods disclosed herein are of particularutility in contributing to a solution to the combination of problemsoutlined above, which are unique to providing a time-efficient androbust editing environment for part programs for a general purposemachine vision inspection system.

DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages of thisinvention will become more readily appreciated as the same become betterunderstood by reference to the following detailed description, whentaken in conjunction with the accompanying drawings, wherein:

FIG. 1 is a diagram showing various typical components of a generalpurpose precision machine vision inspection system;

FIG. 2 is a block diagram of a control system portion and a visioncomponents portion of a machine vision inspection system similar to thatof FIG. 1, and including features according to this invention;

FIG. 3 is a diagram of an editing interface including a representationof a part program that has a plurality of initial part program steps;

FIG. 4 is a diagram of a user interface including a workpiece on whichthe part program steps of FIG. 3 are performed;

FIG. 5 is a diagram of an editing interface including the representationof the part program of FIG. 3 and further including a drop down menu fordefining an editing initialization block;

FIG. 6 is a diagram of an editing interface including the representationof the part program of FIG. 3 and further including a pop-up block forallowing a user to choose whether to run the editing initializationblock after the part program has been recalled for editing;

FIG. 7 is a diagram of an editing interface including the representationof the part program of FIG. 3 and further including additional partprogram step representations that have been added to the part program bya user after the editing initialization block has been run;

FIG. 8 is a diagram of a user interface including the workpiece on whichthe editing initialization block is run and on which the additional partprogram steps of FIG. 7 are performed; and

FIG. 9 is a flow diagram illustrating one embodiment of a routine fordefining and utilizing an editing initialization block when editing apart program on a machine vision inspection system.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of one exemplary machine vision inspectionsystem 10 usable in accordance with the methods described herein. Themachine vision inspection system 10 includes a vision measuring machine12 that is operably connected to exchange data and control signals witha controlling computer system 14. The controlling computer system 14 isfurther operably connected to exchange data and control signals with amonitor or display 16, a printer 18, a joystick 22, a keyboard 24, and amouse 26. The monitor or display 16 may display a user interfacesuitable for controlling and/or programming the operations of themachine vision inspection system 10.

The vision measuring machine 12 includes a moveable workpiece stage 32and an optical imaging system 34 which may include a zoom lens orinterchangeable lenses. The zoom lens or interchangeable lensesgenerally provide various magnifications for the images provided by theoptical imaging system 34. The machine vision inspection system 10 isgenerally comparable to the QUICK VISION® series of vision systems andthe QVPAK® software discussed above, and similar state-of-the-artcommercially available precision machine vision inspection systems. Themachine vision inspection system 10 is also described in commonlyassigned U.S. Pat. Nos. 7,454,053 and 7,324,682, and U.S. PatentApplication Publication Nos. 2010/0158343 and 2011/0103679, which areeach incorporated herein by reference in their entireties.

With regard to the editing of part programs for machine vision systemssuch as that shown in FIG. 1, the refined editing interface features andrelated methods disclosed herein, can provide for more efficient,intuitive, and flexible editing operations, particularly for novice orinfrequent users.

FIG. 2 is a block diagram of a control system portion 120 and a visioncomponents portion 200 of a machine vision inspection system 100 similarto the machine vision inspection system of FIG. 1, and includingfeatures according to the present invention. As will be described inmore detail below, the control system portion 120 is utilized to controlthe vision components portion 200. The vision components portion 200includes an optical assembly portion 205, light sources 220, 230, and240, and a workpiece stage 210 having a central transparent portion 212.The workpiece stage 210 is controllably movable along X and Y axes thatlie in a plane that is generally parallel to the surface of the stagewhere a workpiece 20 may be positioned. The optical assembly portion 205includes a camera system 260, an interchangeable objective lens 250, andmay include a turret lens assembly 280 having lenses 286 and 288.Alternatively to the turret lens assembly, a fixed or manuallyinterchangeable magnification-altering lens, or a zoom lensconfiguration, or the like, may be included. The optical assemblyportion 205 is controllably movable along a Z-axis that is generallyorthogonal to the X and Y axes, by using a controllable motor 294, asdescribed further below.

A workpiece 20, or a tray or fixture holding a plurality of workpieces20, which is to be imaged using the machine vision inspection system 100is placed on the workpiece stage 210. The workpiece stage 210 may becontrolled to move relative to the optical assembly portion 205, suchthat the interchangeable objective lens 250 moves between locations on aworkpiece 20, and/or among a plurality of workpieces 20. One or more ofa stage light 220, a coaxial light 230, and a surface light 240 may emitsource light 222, 232, or 242, respectively, to illuminate the workpieceor workpieces 20. The source light is reflected or transmitted asworkpiece light 255, which passes through the interchangeable objectivelens 250 and the turret lens assembly 280 and is gathered by the camerasystem 260. The image of the workpiece(s) 20, captured by the camerasystem 260, is output on a signal line 262 to the control system portion120. The light sources 220, 230, and 240 may be connected to the controlsystem portion 120 through signal lines or busses 221, 231, and 241,respectively. To alter the image magnification, the control systemportion 120 may rotate the turret lens assembly 280 along axis 284 toselect a turret lens, through a signal line or bus 281.

In various exemplary embodiments, the optical assembly portion 205 ismovable in the vertical Z-axis direction relative to the workpiece stage210 using a controllable motor 294 that drives an actuator, a connectingcable, or the like, to move the optical assembly portion 205 along theZ-axis to change the focus of the image of the workpiece 20 captured bythe camera system 260. The term Z-axis, as used herein, refers to theaxis that is intended to be used for focusing the image obtained by theoptical assembly portion 205. The controllable motor 294, when used, isconnected to the input/output interface 130 via a signal line 296.

As shown in FIG. 2, in various exemplary embodiments, the control systemportion 120 includes a controller 125, the input/output interface 130, amemory 140, a workpiece program generator and executor 170, and a powersupply portion 190. Each of these components, as well as the additionalcomponents described below, may be interconnected by one or moredata/control busses and/or application programming interfaces, or bydirect connections between the various elements.

In various embodiments according to this invention, the workpieceprogram generator and executor 170 includes an editing portion 172,which provides or activates various operations and user interfacefeatures related to editing a part program, as will be described ingreater detail below. It will be appreciated that the terms “workpieceprogram” and “part program” may be used interchangeably herein. Ingeneral, the editing portion 172 includes an editing operationscontroller 174 which controls the operations for the editing functions,and an editing interface 178 that provides the user interface featuresfor the editing functions. The editing operations controller 174includes an editing initialization portion 176 that provides editinginitialization features for the editing functions, as will be describedin more detail below. The editing initialization portion 176 includesediting initialization indicators 177, which define certain editinginitialization parameters that are utilized by the editing operationscontroller 174, as will be described in more detail below. The editinginitialization portion 176 and the editing initialization indicators 177are also linked to the editing interface 178, wherein indicators areprovided in the editing interface of the respective editinginitialization parameters and/or other related parameters.

It will be appreciated that in certain embodiments, the editinginitialization indicators 177 may have certain features and operationssimilar to those of a video tool. In other words, as will be describedin more detail below with respect to FIGS. 5 and 6, when a user sets oneof the indicators, doing so may both define parameters that are utilizedby the editing operations controller 174 (e.g., defining which partprogram steps are within an editing initialization block), while at thesame time providing an indicator in the editing interface 178 on thescreen that indicates the respective parameter (e.g., indicating thefinal part program step and/or what part program steps are within anediting initialization block). In certain implementations, certain ofthe editing initialization indicators 177 may be provided as userinterface features in the editing interface 178 on the screen thatdefine parameters for, and receive parameters from, a user interaction(e.g., defining which part program steps are within an editinginitialization block, receiving an indication from the user as towhether the editing initialization block should be run, etc.).

As shown in FIG. 2, the input/output interface 130 includes an imagingcontrol interface 131, a motion control interface 132, a lightingcontrol interface 133, and a lens control interface 134. The motioncontrol interface 132 may include a position control element 132 a, anda speed/acceleration control element 132 b, although such elements maybe merged and/or indistinguishable. The lighting control interface 133includes lighting control elements 133 a-133 n, which control, forexample, the selection, power, on/off switch, and strobe pulse timing ifapplicable, for the various corresponding light sources of the machinevision inspection system 100.

The memory 140 includes an image file memory portion 141, a workpieceprogram memory portion 142 that may include one or more part programs,or the like, and a video tool portion 143. The video tool portion 143includes video tool portion 143 a and other video tool portions (e.g.,143 m), which determine the GUI, image processing operation, etc., foreach of the corresponding video tools. Many known video tools areincluded in commercially available machine vision inspection systems,such as the QUICK VISION® series of vision systems and the associatedQVPAK® software, discussed above. The video tool portion 143 alsoincludes a region of interest (ROI) generator 143 x that supportsautomatic, semi-automatic and/or manual operations that define variousROIs that are operable in various video tools included in the video toolportion 143.

In general, the memory portion 140 stores data usable to operate thevision system components portion 200 to capture or acquire an image ofthe workpiece 20 such that the acquired image of the workpiece 20 hasdesired image characteristics. The memory portion 140 may also storeinspection result data, may further store data usable to operate themachine vision inspection system 100 to perform various inspection andmeasurement operations on the acquired images (e.g., implemented, inpart, as video tools), either manually or automatically, and to outputthe results through the input/output interface 130. The memory portion140 may also contain data defining a user interface operable through theinput/output interface 130.

The signal lines or busses 221, 231 and 241 of the stage light 220, thecoaxial light 230, and the surface light 240, respectively, are allconnected to the input/output interface 130. The signal line 262 fromthe camera system 260 and the signal line 296 from the controllablemotor 294 are connected to the input/output interface 130. In additionto carrying image data, the signal line 262 may carry a signal from thecontroller 125 that initiates image acquisition.

One or more display devices 136 (e.g., the display 16 of FIG. 1) and oneor more input devices 138 (e.g., the joystick 22, keyboard 24, and mouse26 of FIG. 1) can also be connected to the input/output interface 130.The display devices 136 and input devices 138 can be used to display auser interface, which may include various user interface features thatare usable to perform inspection operations, and/or to create and/ormodify part programs, to view the images captured by the camera system260, and/or to directly control the vision system components portion200. In particular, according to various exemplary embodiments of thepresent invention, the display devices 136 and input devices 138 areused to present various user interface features usable to allowefficient, intuitive, and flexible editing of part programs on themachine vision inspection system 100.

In various exemplary embodiments, when a user utilizes the machinevision inspection system 100 to create a part program for the workpiece20, the user generates part program instructions either by explicitlycoding the instructions automatically, semi-automatically, or manually,using a workpiece programming language, and/or by generating theinstructions by operating the machine vision inspection system 100 in alearn mode to provide a desired image acquisition training sequence. Forexample, a training sequence may comprise positioning a workpiecefeature in the field of view (FOV), setting light levels, focusing orautofocusing, acquiring an image, and providing an inspection trainingsequence applied to the image (e.g., using video tools). The learn modeoperates such that the sequence(s) are captured or recorded andconverted to corresponding part program steps (i.e., instructions).These part program steps, when the part program is executed, will causethe machine vision inspection system to reproduce the trained imageacquisition and inspection operations to automatically inspect aworkpiece or workpieces matching the workpiece used when creating thepart program.

Related editing features and functions are also described in patentapplications entitled “Machine Vision System Program Editing EnvironmentIncluding Real Time Context Generation Features” (Ser. No. 13/297,232);“Machine Vision System Program Editing Environment IncludingSynchronized User Interface Features” (61/560,278); and “Machine VisionSystem Editing Environment For A Part Program In Which A ContinuousStream Of Image Acquisition Operations Are Performed During A Run Mode”(Ser. No. 13/297,220), each of which is filed concurrently herewith andhereby incorporated by reference.

FIG. 3 is a diagram of an editing interface 300 including arepresentation of a part program 310 that has a plurality of initialpart program steps 351-364. The editing interface 300 also includesvarious measurement and/or operation selection bars such as theselection bar 320. The operation of the specific steps of the partprogram 310 will be described in more detail below with respect to FIG.4.

FIG. 4 is a diagram illustrating a user interface 400 including a fieldof view window 410 with a workpiece 415. The user interface 400 alsoincludes various measurement and/or operation selection bars such as theselection bars 420 and 440, a real-time X-Y-Z (position) coordinatewindow 430, a light control window 450, and a video tool parameter box460. As will be described in more detail below, various features on theworkpiece 415 are determined in accordance with related part programsteps of FIG. 3, such as sets of points PTX, PTY, PT3 and PT4, linesXLINE, YLINE, L3 and L4, an origin point XYORIGIN, and an intersectionpoint I2.

The following description will make reference to both the initial partprogram step representations 351-364 of FIG. 3, and the correspondingfeatures on the workpiece 415 of FIG. 4. The part program 310 beginswith the step representations 351 and 352, which indicate that the usermanually selects a location on the workpiece 415 to act as a roughorigin point ROP, and then aligns the origin to the rough origin pointROP. More specifically, the substeps 351A, 351B, 351C and 351D indicatethat the user sets up and utilizes a manual tool to define the roughorigin point ROP and the step representation 352 aligns the origin withthe rough origin point ROP. The step representation 353 then measuresthe line XLINE. More specifically, the sub-steps 353A and 353B indicatethat the user sets up and utilizes a box tool to determine the edgepoints PTX. The functions and operations of box tools and other edgedetection video tools are known in the art and are described in moredetail in the previously incorporated references. The edge points PTXthat are determined by the box tool are then utilized by the sub-step353C to define the line XLINE. Similarly, the step representation 354measures the line YLINE, wherein the sub-step 354A indicates that theuser utilizes a box tool to determine the edge points PTY, which arethen utilized by the sub-step 354B to define the line YLINE.

The step representation 355 then constructs an intersection pointXYORIGIN at the intersection of the lines XLINE and YLINE. The steprepresentation 356 then commands the machine vision system to align theorigin to the point XYORIGIN. The step representation 357 then commandsthe machine vision system to align the X axis for the workpiece 415 tothe line XLINE. As will be described in more detail below with respectto FIG. 5, and as indicated by the comment line 358, the operations ofthe step representations 351-357 establish the correct location andorientation of the workpiece 415 for performing additional measurements.

The step representation 361 then measures the line L3. Morespecifically, the sub-steps 361A and 361B indicate that the user sets upand utilizes a box tool to determine the edge points PT3, which are thenutilized by the sub-step 361C to define the line L3. Similarly, the steprepresentation 362 measures the line L4, wherein the sub-step 362Aindicates that the user utilizes a box tool to determine the edge pointsPT4, which are then utilized by the sub-step 362B to define the line L4.The step representation 363 indicates that the user defines a selectedposition tolerance and the step representation 364 constructs anintersection point I2 where the previously determined lines L3 and L4intersect. Once these initial part program steps 351-364 have beenprogrammed by a user, the user may elect to set an editinginitialization block marker, as will be described in more detail belowwith respect to FIG. 5.

FIG. 5 is a diagram of an editing interface 500 including therepresentation of the part program 310 of FIG. 3 and further including adrop down menu 520 for defining an editing initialization block to besaved with the part program. As shown in FIG. 5, the drop down menu 520includes a selection 530 for setting an editing initialization blockmarker, and a selection 535 for clearing an editing initialization blockmarker. In one embodiment, the drop down menu 520 may be provided when auser selects a particular step representation (e.g., in the illustrationof FIG. 5, the user has selected the step representation 357 by using amouse to move a selector over the step representation 357 and then byright clicking on it). The step representation that is selected with theediting initialization block marker (e.g., step representation 357) maybe indicated by a selector box (e.g., a selector box 540 as illustratedin FIG. 5), or highlighting or other indicator method.

Once the user designates the step representation 357 with the editinginitialization block marker, this designates that all of the stepspreceding and up to step representation 357 (i.e., step representations351-357) are editing initialization steps which make up an editinginitialization block 550. The step representation 357 is thereforedetermined to be the last initial part program step that is an editinginitialization step. In one embodiment, an editing initializationindicator may be provided in the editing interface 500 that indicatesthat each of the step representations 351-357 are editing initializationsteps. In the specific example illustration of FIG. 5, a color bar 555(shown with cross hatch) is provided next to the step representations351-357 to indicate that they are in the editing initialization block550. In alternative embodiments, other editing initialization indicatorsmay be utilized for indicating the editing initialization steps (e.g., adelimiting pointer, delineating markers, highlighting of the actualsteps rather than a bar next to the steps, etc.). In one embodiment,when the part program 310 is saved, the indication of which steps areediting initialization steps is also saved.

In some embodiments, the editing initialization steps comprise partprogram steps that move the imaging portion relative to the stage. Forexample, as shown in FIG. 5, the step representations 351A, 351B and353A may involve steps that move the imaging portion relative to thestage.

It will be appreciated that the remaining initial part program steprepresentations 361-364 which follow the editing initialization blockmarker indicated by the selector box 540 and which are therefore notincluded in the editing initialization block 550, may not be run in thesame manner when the editing initialization block 550 is run, as will bedescribed in more detail below. In one embodiment, the steprepresentations 361-364 are designated as being in a remaining stepsblock 560.

As will be described in more detail below, in one embodiment, theediting initialization block 550 may be utilized to address certainchanges in conditions that may occur during the editing process for apart program. For example, if after a user saves a part program, theuser leaves the work station and returns at a later time, in the interimcertain changes may have occurred (e.g., the part being inadvertentlymoved on the stage, etc.) that may affect the editing of the partprogram. However, due to the amount of time that may be required forrerunning all of the previous steps of a part program (particularlythose steps that require certain time-consuming processes such ashardware interactions, etc.), a user may desire to only rerun the stepsthat are required for establishing the desirable conditions forcontinuing the edits. In accordance with the present invention, a usermay designate the editing initialization block 550 which comprises stepsthat have been determined to be necessary for returning to the desirableconditions for continuing the edits. The editing initialization steps ofthe editing initialization block 550 comprise initial part program stepsthat will reestablish a part coordinate system for the part, so as tocompensate for any inadvertent movement of the part on the stage sincethe last part program steps were performed.

FIG. 6 is a diagram of an editing interface 600 including therepresentation of the part program 310 of FIG. 3 and further including apop-up block 620 for allowing a user to choose whether to run theediting initialization block after the part program has been recalledfor editing. As shown in FIG. 6, the pop-up block 620 prompts a userthat the editing initialization steps may be run and queries the user asto whether the editing initialization block should be run again, andprovides a yes button 630A and a no button 630B. If the yes button 630Ais selected, then the editing initialization block 550 is run againprior to the adding of additional steps to the part program, as will bedescribed in more detail below with respect to FIGS. 7 and 8. If the nobutton 630B is selected, then additional steps may be added to the partprogram without rerunning the editing initialization block 550. Incertain implementations, the user may also elect to rerun the entirepart program 310, prior to adding additional steps to the part program.

It will be appreciated that in an alternative embodiment, the editinginitialization block 550 may be set to run automatically when the partprogram 310 is recalled for editing. In one implementation, this may bedone by a default setting, or a user may be provided with an option whenthe part program is saved for whether or not to have the editinginitialization block run automatically when the part program is recalledfor editing. In certain implementations, it may be desirable to not havethe editing initialization block be run automatically (e.g., it may bestartling to a user if the machine vision system begins to move on itsown without any prompting or warning, etc.).

FIG. 7 is a diagram of an editing interface 700 including therepresentation of the part program 310 of FIG. 3 and further includingan added steps block 770 which includes additional part program steprepresentations 771-774 that have been added to the part program afterthe editing initialization block 550 has been run. The specificoperations of the running of the editing initialization block 550 andthe step representations 771-774 will be described in more detail belowwith respect to FIG. 8.

FIG. 8 is a diagram of a user interface 800 including the workpiece 415on which the editing initialization block 550 is run and on which theadditional part program steps of FIG. 7 are performed. As shown in FIG.8, the running of the editing initialization block 550 has reestablishedthe locations of the lines XLINE and YLINE, and the point XYORIGIN onthe workpiece 415. More specifically, the step representations have beenrun so as to utilize box tools to reestablish the locations of the edgepoints PTX and PTY on the workpiece 415, from which the locations of thelines XLINE and YLINE and the point XYORIGIN have been redetermined. Inaccordance with the initial part program step representations 351-357,the correct determination of the locations of these features ensures theaccuracy of the location and orientation of the workpiece 415 forpurposes of adding additional part program steps. In other words, if theworkpiece 415 has been inadvertently moved on the stage since the timewhen the workpiece program 310 was last saved, the running of theediting initialization block 550 would reestablish the correct locationand orientation of the workpiece 415 for the purpose of adding furtherpart program steps.

In contrast, in one embodiment, the initial part program steps 361-364in the remaining steps block 560, which are not editing initializationsteps, are not run in the same manner. Instead, in certainimplementations, estimated sets of points PT3′ and PT4′ may be providedbased on the relative locations of those points as determined from theinitial performance of the part program steps 351-364 as illustrated inFIG. 4. In other words, the relative locations of the points PT3 and PT4in FIG. 4 (e.g., as referenced to the point XYORIGIN) are saved when thepart program 310 is initially performed and saved. Thereafter, when thepart program 310 is recalled for editing and the editing initializationblock 550 is run so as to reestablish the location of the point XYORIGINas shown in FIG. 8, rather than also reestablishing the locations of thepoints PT3 and PT4, the previously saved relative locations to the pointXYORIGIN are used to determine the locations of the estimated pointsPT3′ and PT4′.

In other words, the locations of the estimated points PT3′ and PT4′ maynot be based on the running of the sub-steps 361A, 361B, and 362A, allof which require hardware interaction and edge detection and would takea relatively long time to perform. In one embodiment, any sub-stepswhich are not in the editing initialization block and which wouldgenerally require certain designated time-consuming operations (e.g.,hardware interactions such as moving the stage, edge detection,focusing, lighting changes, pattern matching, etc.) are not performed.Instead, any resulting data (e.g., redetermined edge points, etc.) thatwould have been provided is based on estimated data (e.g., the locationsof the estimated points PT3′ and PT4′ relative to the point XYORIGIN).As noted above, the correct location of the point XYORIGIN has beenreestablished by running the editing initialization block 550.

It will be appreciated that by not running certain designated timeconsuming sub-steps, significant time savings may be achieved. This isdue to the fact that such processes may take a relatively long time toperform, particularly in comparison to processes which only requirecalculations to be performed by the controller of the machine visionsystem. It will be appreciated that while in the example of FIG. 7 onlya few such sub-steps (e.g., sub-steps 361A, 361B, and 362A) of this typehave been illustrated, in a more detailed part program, significantlymore sub-steps of this type may be utilized, for which the time savingsmay be significant.

In one embodiment, the sub-steps 361C and 362B (which do not requirerelatively time-consuming operations and only require the relativelyfast processing of the controller of the machine vision system toutilize the estimated points PT3′ and PT4′ to establish the locations ofthe estimated lines L3′ and L4′) may still be run when the editinginitialization block 350 is run. Similarly, the additional steprepresentation 364 (which only requires the relatively fast processingof the controller) may also be run to determine the estimatedintersection point I2′ at the intersection of the estimated lines L3′and L4′. It will be appreciated that the calculations performed by thesub-steps 361C, 362B and 364 are all of a type that can be performedrelatively quickly on the estimated edge points PT3′ and PT4′, withoutrequiring significant time or input from the user. Thus, certainportions of the initial part program steps 361-364 in the remainingsteps block 560 may also be run (e.g., to establish certain additionalpart features that may be used for additional part program stepmeasurements) when the editing initialization block 550 is run.

With regard to the additional part program step representations 771-774that are added to the part program 310 so as to create the edited partprogram 710, the specific operations of the step representations willalso be described with respect to FIG. 8. As shown in FIG. 8, the steprepresentation 771 measures a line L1. More specifically, the sub-steps771A and 771B indicate that a user sets up and utilizes a box tool todetermine the edge points PT1, which are then utilized by the sub-step771C to define the line L1. Similarly, the step representation 772measures a line L2, wherein the sub-step 772A indicates that the userutilizes a box tool to determine the edge points PT2, which are thenutilized by the sub-step 772B to define the line L2.

The step representation 773 determines an intersection point I1 at theintersection of the lines L1 and L2. The step representation 774determines a distance D1 between the intersection point I1 and theestimated intersection point I2′ that was determined at the steprepresentation 364. It will be appreciated that the step representation774 thus illustrates how a new measurement of the distance between theintersection point I1 and the estimated intersection point I2′ may relyon the estimated positions provided after the running of the editinginitialization block 550. More specifically, the location of theestimated intersection point I2′, which as described above was able tobe determined relatively quickly and with a reasonable assurance ofaccuracy based on the running of the editing initialization block 550,can be utilized for the new distance measurement D1 to the intersectionpoint I1.

FIG. 9 is a flow diagram illustrating one exemplary embodiment of aroutine 900 for defining and utilizing an editing initialization blockwhen editing a part program on a machine vision inspection system. At ablock 910, a plurality of initial part program steps are defined andcorresponding part program step representations are displayed in anediting interface of a user interface. At a block 920, an editinginitialization portion is provided. At a block 930, the editinginitialization portion is operated to define at least some of theplurality of initial part program steps as editing initialization stepsfor the part program. At a block 940, the editing initialization portionis operated such that when a part program is recalled for editing, ifthe part program includes defined editing initialization steps, then theediting portion performs at least one of (a) prompting the user with auser interface feature in the editing interface that indicates that theediting initialization steps may be run, and (b) running the editinginitialization steps before allowing the addition of steps to the partprogram.

While various preferred and exemplary embodiments of the invention havebeen illustrated and described, it will be appreciated that variouschanges can be made therein without departing from the spirit and scopeof the invention.

The invention claimed is:
 1. A method for editing a part program on amachine vision inspection system comprising: providing a machine visioninspection system including an imaging portion, a stage for holding oneor more parts in a field of view (FOV) of the imaging portion, a motioncontrol portion that moves the imaging portion relative to the stage, adisplay that displays a user interface (UI), and a controller; defininga plurality of initial part program steps and displaying correspondingpart program step representations in an editing interface of the userinterface; providing an editing initialization portion; operating theediting initialization portion to define at least some of the pluralityof initial part program steps as editing initialization steps for thepart program, wherein executing the defined editing initialization stepsoperates the machine vision inspection system to establish apredetermined condition for subsequent editing of the part program; andoperating the editing initialization portion such that when a partprogram is recalled for editing, the recalled part program is checkedfor defined editing initialization steps, and if the recalled partprogram includes defined editing initialization steps, then the editinginitialization portion performs one of (a) prompting the user with auser interface feature in the editing interface that indicates that theediting initialization steps may be run, and (b) running the editinginitialization steps before allowing addition of steps to the partprogram.
 2. The method of claim 1, wherein the editing initializationportion can be configured by a user to define the editing initializationsteps.
 3. The method of claim 2, wherein the editing initializationportion comprises a drop down menu that is provided in the editinginterface with a selection for defining the editing initializationsteps.
 4. The method of claim 3, wherein the drop down menu furtherincludes a selection for performing at least one of (a) redefining theediting initialization steps, or (b) undoing the prior defining of theediting initialization steps.
 5. The method of claim 2, wherein theediting initialization portion comprises an editing initializationindicator which comprises at least one of a color bar, a delimitingpointer, or a text highlighting portion which a user may utilize todefine in the editing interface which of the initial part program stepsare editing initialization steps.
 6. The method of claim 2, wherein theset of editing initialization steps is defined as an editinginitialization block which is determined by the user indicating the lastinitial part program step that is an editing initialization step.
 7. Themethod of claim 2, wherein if the editing initialization portioncomprises a type of editing initialization indicator which indicates inthe editing interface which of the steps are the editing initializationsteps, then when the part program is recalled for editing, a similarediting initialization indicator is provided in the editing interface toindicate the editing initialization steps.
 8. The method of claim 1,wherein the user interface feature indicating that the editinginitialization steps may be run comprises a pop-up block which asks theuser whether or not the editing initialization steps should be run. 9.The method of claim 1, wherein the user interface feature indicatingthat the editing initialization steps may be run is automaticallyprovided to the user at a time when the part program is recalled and anindication is made that additional part program steps are to be added.10. The method of claim 1, wherein the editing initialization stepscomprise part program steps that move the imaging portion relative tothe stage.
 11. The method of claim 10, wherein the editinginitialization steps comprise part program steps that determine at leastone of an origin coordinate or an orientation of the part that is usedas a reference for measuring other features on the part.
 12. The methodof claim 1, wherein any portions of any initial part program steps thatwould otherwise perform certain designated processes except that theyare not editing initialization steps are not run.
 13. The method ofclaim 12, wherein the designated processes comprise one or more ofhardware interactions, moving the imaging portion relative to the stage,edge detection operations, lighting adjustment operations, focusingoperations, and pattern matching.
 14. The method of claim 12, where anyportions of any initial part program steps that are not editinginitialization steps but do not perform any of the designated processesare still run when the editing initialization steps are run and mayutilize estimated data that is related to data determined from therunning of the editing initialization steps.
 15. The method of claim 1,wherein the editing initialization steps comprise initial part programsteps that will reestablish a part coordinate system for the part, so asto compensate for any inadvertent movement of the part on the stagesince the last part program steps were performed.
 16. The method ofclaim 1, wherein when a part program is recalled for editing and theediting initialization steps are run, at least some of the data thatwould have been obtained by one or more of the initial part programsteps that are not editing initialization steps and which therefore arenot run in the same manner is instead based on the data obtained fromthe editing initialization steps.
 17. A machine vision inspection systemcomprising: an imaging portion, a stage for holding one or more parts ina field of view (FOV) of the imaging portion, a motion control portionthat moves the imaging portion relative to the stage, a display thatdisplays a user interface (UI), and a controller, the controllerincluding a computer-executable program that performs steps comprising:defining a plurality of initial part program steps and displayingcorresponding part program step representations in an editing interfaceof the user interface; providing an editing initialization portion;operating the editing initialization portion to define at least some ofthe plurality of initial part program steps as editing initializationsteps for the part program, wherein executing the defined editinginitialization steps operates the machine vision inspection system toestablish a predetermined condition for subsequent editing of the partprogram; and operating the editing initialization portion such that whena part program is recalled for editing, the recalled part program ischecked for defined editing initialization steps, and if the recalledpart program includes defined editing initialization steps, then theediting initialization portion performs one of (a) prompting the userwith a user interface feature in the editing interface that indicatesthat the editing initialization steps may be run, and (b) running theediting initialization steps before allowing the addition of steps tothe part program.
 18. The machine vision inspection system of claim 17,wherein the editing initialization portion comprises an editinginitialization indicator portion which provides indicators that a usermay utilize to define in the editing interface which of the initial partprogram steps are editing initialization steps.
 19. The machine visioninspection system of claim 17, wherein the editing initialization stepscomprise part program steps that move the imaging portion relative tothe stage.
 20. The machine vision inspection system of claim 19, whereinwhen a part program is recalled for editing and the editinginitialization steps which move the imaging portion relative to thestage are run, at least some of the data that would have been obtainedby one or more of the initial part program steps that would have movedthe imaging portion relative to the stage except that they are notediting initialization steps and which are therefore not run is insteadbased on the data obtained from the editing initialization steps whichdid move the imaging portion relative to the stage.